<?php

namespace cf\api\image;

require_once dirname(__FILE__).'/../config.php';
require_once \cf\Config::path.'image.php';

function getThumbnail($path, $width, $height)
{
	if (!$path) {
		return '';
	}
	\cf\Image::$USE_IMAGEMAGICK = \cf\Config::use_imagemagick;
	$thumb = new \cf\Thumbnail($_SERVER['DOCUMENT_ROOT'].'/'.$path, $width, $height);
	return $thumb->url();
}

?>